package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.vo.ColumnCourseAuthVO;
import com.lanchetech.entity.ColumnCourseAuth;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ColumnCourseAuthMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ColumnCourseAuth record);

    int insertSelective(ColumnCourseAuth record);

    ColumnCourseAuth selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ColumnCourseAuth record);

    int updateByPrimaryKey(ColumnCourseAuth record);

    int updateBatch(List<ColumnCourseAuth> list);

    int updateBatchSelective(List<ColumnCourseAuth> list);

    int batchInsert(@Param("list") List<ColumnCourseAuth> list);

    ColumnCourseAuth findOneByUserIdAndColumnIdAndType(@Param("userId")Long userId,@Param("columnId")Long columnId,@Param("type")Byte type);

    ColumnCourseAuth findOneByUserIdAndCourseIdAndType(@Param("userId")Long userId,@Param("courseId")Long courseId,@Param("type")Byte type);

    List<ColumnCourseAuth> findAllByUserIdAndColumnIdAndType(@Param("userId")Long userId,@Param("columnId")Long columnId,@Param("type")Byte type);

    List<ColumnCourseAuthVO> findAllPage(PageReq req);

    int deleteByUserIdAndOrderSkuId(@Param("userId")Long userId,@Param("orderSkuId")Long orderSkuId);

    int deleteByUserIdAndOrderSkuIds(@Param("userId")Long userId,@Param("orderSkuIds")List<Long> orderSkuIds);



}